django怎么同时遍历两个数组答:'1'?=?Array?(?'cid'?=?2?,'pid'?=?3?,'name'?=?'分类4',?'displayorder'?=?2?,'docs'?=?18?),'2'?=?Array?(?'cid'?=?3?,'pid'?=?3?,'name'?=?'分类1',?'displayorder'?=?2?,'docs'?=?18?)?);result=?array_merge($cliest,$dliest);foreach($result?as?$...
php面试题及答案php面试题答:10}变为{6,7,8,9,10,1,2,3,4,5}. 思路:先把数组截取相应的长度( array_slice ),再把2段数组拼接( array_merge ) 代码如下: function arrsort($arr){ $num = count($arr); if($num 10){ //array_slice($arr,起始位置,截取长度,保留索引(默认为false)) $arr_firstpart ...